﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCTinhHinhTangLuong.ascx.cs"
    Inherits="Viewer.BaoCao.UserControls.UCTinhHinhTangLuong" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:XScript ID="XScipt1" runat="server">
    <script type="text/javascript">
        function ConfirmDeleteDiaChi(id) {
            Ext.MessageBox.confirm('Thông báo', 'Bạn có chắc chắn xóa record này ko?', function doDel2(btn) {
                if (btn == 'yes') {
                    #{DirectMethods}.DialogDiaChi('Delete',id);
                }
            });
        }
         var prepareCommand = function (grid, toolbar, rowIndex, record) {
            var firstGrid = toolbar.items.get(0);
            firstGrid.menu.items.items[0].disabled=!IsView;
            firstGrid.menu.items.items[1].disabled=!IsEdit;
            firstGrid.menu.items.items[2].disabled=!IsDelete;
            
             //   firstButton.setDisabled(true);
            
            //you can return false to cancel toolbar for this record
        };       
    </script>
</ext:XScript>
<ext:Window ID="wdTinhHinhTangLuong" runat="server" Modal="true" Height="400" Closable="false"
    Hidden="true" HideBorders="True" Border="false" Plain="true" Width="900" Resizable="false"
    Frame="false" Title="Tình hình sắp tăng lương" Icon="Find">
    <Content>
        <table>
            <tr>
                <td>
                    <ext:Hidden ID="hdNodeIdToChuc" runat="server" />
                    <ext:Label ID="TextField1" runat="server" Text="Tình hình cần tăng lương trong vòng">
                    </ext:Label>
                    <ext:TextField ID="txtMonth" runat="server" EmptyText="">
                    </ext:TextField>
                    <ext:Label ID="Label1" runat="server" Text="tháng">
                    </ext:Label>
                </td>
                <td>
                    <ext:Button ID="btnSearch" runat="server" Text="Tìm kiếm" Icon="Zoom">
                    <Listeners>
                    <Click Handler="Ext.net.Mask.show();" />
                    </Listeners>
                        <DirectEvents>
                            <Click OnEvent="BtnSearchTangLuong_Click">
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                </td>
            </tr>
        </table>
        <ext:GridPanel ID="GridPanel1" runat="server" StripeRows="true" MonitorResize="true"
            Height="500" Border="false" Width="900">
            <View>
                <ext:GridView EmptyText="Không có dữ liệu" AutoFill="true">
                </ext:GridView>
            </View>
            <ColumnModel ID="ColumnModel1" runat="server">
                <Columns>
                    <ext:Column Header="Số hiệu CBCC" DataIndex="SoHieu" Width="100" />
                    <ext:Column Header="Tên" DataIndex="Ten" Resizable="true" Width="150" />
                    <ext:Column Header="Ngày sinh" DataIndex="NgaySinh" Resizable="true" Width="100" />
                    <ext:Column Header="Số CMND" DataIndex="SoCMND" Resizable="true" />
                    <ext:Column Header="Quê quán" DataIndex="QueQuan" Resizable="true" Width="150" />
                    <ext:Column Header="Chức vụ hiện tại" DataIndex="ChucVuHienTai" Resizable="true"
                        Width="100" />
                    <ext:Column Header="Cơ quan quản lí" DataIndex="CoQuanQL" Resizable="true" Width="150" />
                    <ext:DateColumn Format="dd/MM/yyyy" Header="Ngày dự định tăng lương" DataIndex="NgayDuDinhTangLuong"
                        Resizable="true" Width="200" />
                    <ext:Column Header="Thời gian còn lại" DataIndex="ThoiGianConLai" Resizable="true"
                        Width="200" />
                </Columns>
            </ColumnModel>
            <SelectionModel>
                <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />
            </SelectionModel>
            <BottomBar>
                <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageIndex="1" PageSize="20"
                    HideRefresh="true">
                </ext:PagingToolbar>
            </BottomBar>
            <Store>
                <ext:Store ID="storeNhanVienTangLuong" runat="server">
                    <Reader>
                        <ext:JsonReader IDProperty="Id">
                            <Fields>
                                <ext:RecordField Name="SoHieu" />
                                <ext:RecordField Name="Id" />
                                <ext:RecordField Name="Ten" />
                                <ext:RecordField Name="NgaySinh" />
                                <ext:RecordField Name="SoCMND" />
                                <ext:RecordField Name="QueQuan" />
                                <ext:RecordField Name="ChucVuHienTai" />
                                <ext:RecordField Name="CoQuanQL" />
                                <ext:RecordField Name="NgayDuDinhTangLuong" Type="Date" />
                                <ext:RecordField Name="ThoiGianConLai" />
                            </Fields>
                        </ext:JsonReader>
                    </Reader>
                </ext:Store>
            </Store>
        </ext:GridPanel>
    </Content>
    <Buttons>
        <ext:Button ID="BtnSelect" runat="server" Text="Export excel" Icon="Tick">
            <Listeners>
            </Listeners>
        </ext:Button>
        <ext:Button ID="Button1" runat="server" Text="Đóng" Icon="Cancel">
            <Listeners>
                <Click Handler="#{wdTinhHinhTangLuong}.hide();" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>
